<% layout('../layouts/layout.html', {
title: '登入',
page: 'user',
isColumn: false,
keywords: 'JeeWeb SpringMVC Spring Hibernate',
description: 'JeeWeb是一款基于SpringMVC+Spring+Hibernate的敏捷开发系统；它是一款具有代码生成功能的智能快速开发平台；是以Spring Framework为核心容器，Spring MVC为模型视图控制器，Hibernate为数据访问层， Apache Shiro为权限授权层，Ehcahe对常用数据进行缓存，Disruptor作为并发框架，Bootstrap作为前端框架的优秀 开源 系统。'
}){ %>
<div class="layui-container fly-marginTop fly-user-main">
  <% include("../common/user-nav.html"){}%>

  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>

  <div class="site-tree-mobile layui-hide">
    <i class="layui-icon">&#xe602;</i>
  </div>
  <div class="site-mobile-shade"></div>


  <div class="fly-panel fly-panel-user" pad20>
    <!--
    <div class="fly-msg" style="margin-top: 15px;">
      您的邮箱尚未验证，这比较影响您的帐号安全，<a href="activate.html">立即去激活？</a>
    </div>
    -->
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title" id="LAY_mine">
        <li data-type="mine-jie" lay-id="index" class="layui-this">我发的帖</li>
        <li data-type="collection" data-url="/collection/find/" lay-id="collection">我收藏的帖</li>
      </ul>
      <div class="layui-tab-content" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
          <table class="layui-table" lay-data="{width: 892, height:480, url:'${ctx}/posts/myPublistList/', page:true, id:'myPublistList'}" lay-filter="myPublistListFilter">
            <thead>
            <tr>
              <th lay-data="{field:'title', templet: '#myPublistTitleTpl'}">帖子标题</th>
              <th lay-data="{field:'solved', width:80,templet: '#solvedTpl'}">结贴</th>
              <th lay-data="{field:'publishTime', width:180}">发表时间</th>
              <th lay-data="{field:'readCount', width:100}">阅读量</th>
              <th lay-data="{fixed: 'right', width:178, align:'center', toolbar: '#myPublistListOptBar'}"></th>
            </tr>
            </thead>
          </table>
          <script type="text/html" id="myPublistTitleTpl">
            <a href="/posts/{{d.id}}/detail" class="layui-table-link" target="_blank">{{d.title}}</a>
          </script>
          <script type="text/html" id="solvedTpl">
            {{#  if(d.solved === 1){ }}
              是
            {{#  } else { }}
             否
            {{#  } }}
          </script>
          <script type="text/html" id="myPublistListOptBar">
            <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">查看</a>
            <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
          </script>
        </div>
        <div class="layui-tab-item">
          <table class="layui-table" lay-data="{width: 892, height:332, url:'${ctx}/posts/myCollectionList/', page:true, id:'myCollectionList'}" lay-filter="myCollectionListFilter">
            <thead>
            <tr>
              <th lay-data="{field:'title',templet: '#titleTpl'}">帖子标题</th>
              <th lay-data="{field:'collectionTime', width:180}">收藏时间</th>
            </tr>
            </thead>
          </table>
          <script type="text/html" id="titleTpl">
            <a href="/posts/{{d.posts.id}}/detail" class="layui-table-link" target="_blank">{{d.posts.title}}</a>
          </script>
        </div>
      </div>
    </div>
  </div>
</div>
<% } %>

<script>
    layui.config({
        version: "3.0.0"
        ,base: '${staticPath}/mods/'
    }).extend({
        fly: 'index'
    }).use('fly');
</script>